<%@ page import="com.conversationboard.model.*" %>
<%@ page import="com.conversationboard.view.*" %>
<%@ page import="com.conversationboard.config.*" %>
<%@ page import="com.conversationboard.site.*" %>
<%@ page import="com.conversationboard.model.*" %>
<%@ page import="java.security.Principal" %>
<%@ page import="java.util.*" %>
<%@ page import="com.conversationboard.controller.confirm.Confirm" %>

<%@page pageEncoding="UTF-8"%>
<%@page contentType="text/html;charset=UTF-8"%>

<%
    Principal principal = request.getUserPrincipal();
    String userName = null;
    
    if (principal!=null) {
    	userName = principal.getName();
    }
   
 	User user = User.get(userName);

	if (!user.isSiteAdmin()) {
	    return;
	}

	PendingRegistrations pendingRegistrations = PendingRegistrations.getInstance();
%>


<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<title>Pending Registrations</title>
		<link rel="stylesheet" type="text/css" href="<%=Configuration.getInstance().getRoot()%>/Stylesheets/<%=StyleSheets.getStyleSheetFileName(request.getCookies())%>"/>
	</head>

	<body>
	
		<%= MainMenu.display(request.getUserPrincipal()) %>

		<div class="headingblock">
			<h1>Pending Registrations</h1>
		</div>

		<div class="mainblock">
			
			<form class="formsection" action="<%=Configuration.getInstance().getRoot()%>/Admin/AdminPendingRegistrationsControllerServlet" method="post">

			 	<%= Confirm.getKey(request.getUserPrincipal().getName()) %>
			 	
			 	<%= PendingRegistrationsDisplay.display(pendingRegistrations, user) %>
			 	
			 	<p>* If this user registering is already registered with the system (i.e. we have a recent record of their IP address), then the login ID will show here.
			 	   It's possibly someone trying to register with another's display name.</p>
		
				<p>If you suspect the user might be using an <strong>anonymous proxy server</strong>, you might want to check the IP address <a href="http://proxy.org/proxies_sorted2.shtml">against one on this list</a>.
		
			 	<p><input type="submit" value="     OK     " /></p>

			</form>

		</div>

		<!--<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>-->
		<!--<script type="text/javascript">_uacct = "UA-1148679-1";urchinTracker();</script>--> 

	</body>
	
</html>
